home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Rozne / HTTrack 3.40-2 / httrack-3.40-2.exe / {app} / src_win / WinHTTrack / RasLoad.cpp < prev    next >
C/C++ Source or Header  |  2005-08-14  |  1KB  |  43 lines

  1. /*----------------------------------------------------------------------
  2. Copyright (c) 1998,1999 Gipsysoft. All Rights Reserved.
  3. File:    DynamicRAS.h
  4. Owner:    russf@gipsysoft.com
  5. Purpose:    Dynamically loaded RAS.
  6. ----------------------------------------------------------------------*/
  7.  
  8. /* Thanks to Russ Freeman from gipsymedia */
  9.  
  10. #include "stdafx.h"
  11. #include "RasLoad.h"
  12.  
  13. CDynamicRAS::CDynamicRAS()
  14.     : m_hInst( LoadLibrary( _T("rasapi32") ) )
  15.     , pRasEnumConnections( NULL )
  16.     , pRasHangUp( NULL )
  17.     , pRasGetConnectStatus( NULL )
  18.   , pRasDial( NULL )
  19.   , pRasEnumEntries( NULL )
  20.   , pRasGetEntryDialParams( NULL )
  21. {
  22.     if( IsRASLoaded() )
  23.     {
  24.         pRasEnumConnections = (PRASENUMCONNECTIONS)GetProcAddress( m_hInst, "RasEnumConnectionsA" );
  25.         pRasHangUp = (PRASHANGUP)GetProcAddress( m_hInst, "RasHangUpA" );
  26.         pRasGetConnectStatus = (PRASGETCONNECTSTATUS)GetProcAddress( m_hInst, "RasGetConnectStatusA" );
  27.         pRasDial = (PRASDIAL)GetProcAddress( m_hInst, "RasDialA" );
  28.     pRasEnumEntries = (PRASENUMENTRIES)GetProcAddress( m_hInst, "RasEnumEntriesA" );
  29.     pRasGetEntryDialParams = (PRASGETENTRYDIALPARAMS)GetProcAddress( m_hInst, "RasGetEntryDialParamsA" );
  30.     }
  31. }
  32.  
  33. CDynamicRAS::~CDynamicRAS()
  34. {
  35.     if( IsRASLoaded() )
  36.     {
  37.         FreeLibrary( m_hInst );
  38.     }
  39. }
  40.  
  41.  
  42.  
  43.